This document contains notes in italic on compatbility with Appearance Manager 1.0.2
Introduction
The new Appearance manager introduced with MacOS 8 is programmed with a set of new resources ('alrx', 'dlgx', 'ldes', 'tab#', 'dftb' and 'xmnu'). In Apple's preliminary distribution of the Appearance manager programmer documentation, a Rez file was included, which allows users of Resourcer (or Rez code 'jockeys') to make a set of Appearance manager templates. The Appearance Manager SDK 1.0.2 includes only a set of Resourcer templates. ResEdit users are left out in the cold.
This package consists of a set of templates that allow editing of new Appearance manager resources with ResEdit, with a couple of caveats. It will be of interest to developers and hackers who do not have Resourcer, or who prefer to use ResEdit.
This package does not contain instructions on how to program the Appearance manager, nor does it explain the data in the templates themselves. This information can be found in Appearance Manager 1.0.2 SDK at <ftp://ftp.apple.com/devworld/Development_Kits/Appearance_1.0.2_SDK.sit.hqx>
Requirements
The software required to use these templates is Apple's ResEdit (version 2.1.3), which can be downloaded from Apple's ftp site. It is not necessary to have the Appearance manager in order to use the ResEdit templates.
Installation
Enabling ResEdit to use the new Appearance manager templates requires two steps: Installing the actual templates, and installing the resource icons.
For the templates:
1. Duplicate your "ResEdit Preferences" document, which is located in your "Preferences" folder.
2. Open this duplicate and the "Templates" document in ResEdit.
4. In the "Templates" window, select the 'TMPL' resource and copy it to the clipboard.
5. In the duplicate preferences window, paste the templates from the clipboard. If you are warned that there are already resources with the same id, choose the Unique Id button.
6. Save the changes made to the duplicate preferences.
7. Quit ResEdit.
8. Move the "ResEdit Preferences" document from the "Preferences" folder into the trash.
9. Put the duplicate preferences into the "Preferences" folder and rename it as "ResEdit Preferences".
This is the standard procedure for installing any new ResEdit template.
For the resource icons:
1. Duplicate the ResEdit application.
2. Open your original ResEdit application with the duplicate ResEdit application.
3. Open the "Resource Icons" document.
4. In the "Resource Icons" window, select the 'ICON' and 'icl4' resources and copy them to the clipboard.
5. In the ResEdit application window, paste the icons from the clipboard. If you are warned that there are already resources with the same id, choose the Unique Id button.
6. Save the changes made to the ResEdit application.
7. Quit ResEdit.
8. Move the duplicate ResEdit application to the trash, and empty the trash.
You can new test your new templates by opening an Appearance manager-savy application. The 'alrx', 'dlgx' etc resources should now have cute icons. If you open the resources, you should be presented with a template rather than the usual hex dump.
Important
There are some important issues with using these templates:
1. There is a bug in the version 1.0.0 of the Appearance manager used with MacOS 8.0 and version 1.0.1 used with MacOS 8.1. The bug causes the title of movable alerts to be read from the wrong address in the 'alrx' resource (specifically $1C instead of $0C). This brings about a problem: If you want to use titles with your alerts, and we put the title string at the offset that works correctly for Appearance manager version 1.0.0, it will not work with a new version of the Appearance manager. However, if the alert title is 16 characters or shorter, we can put the alert title at both $0C and $1C, and this will work for the old and newer versions of the Appearance manager. This is the approach used by this set of templates - you will have to enter your alert title twice.
Apple has fixed this bug with version 1.0.2 of the Appearance manager. The alert title is now correctly read from location $0C. In the Appearance Manager 1.0.2 SDK, it is noted that "The 'alrx' resources in version 1.0 did not work as advertised. Do not use 'alrx' resources in 1.0 If you wish to use 'alrx' resources you must run under Appearance 1.0.2. Use only the 1.0.2 format as described in the REZ template supplied in this SDK. ". It appears that the format of the 'alrx' resource has not changed from that published in the preliminary documentation for 1.0.0. You can therefore continue to use the template with two titles (as described above), or you can switch to the 'alrx' 1.0.2 template provided, which will only work with Appearance 1.0.2.
Note that if you want to strictly follow Apple's guidelines and put the alert title at the first offset only, be aware that if the alert title is longer than 16 characters, users with version 1.0.0 and 1.0.1 of the Appearance manager (i.e. people with MacOS 8.0 and 8.1) will get garbage in their window titles (this is because an ordinary character in your title string is being interpreted as the length byte).
You will notice that none of the 'alrx' resources used in MacOS 8.0 (e.g. the Finder) have titles.
2. The templates for the 'dftb' and 'xmnu' resources don't behave in exactly the 'correct' manner. This is because the Resourcer templates for these resources use a 'case' statement, which ResEdit's templates structure does not support. It is still possible to create and edit 'dftb' and 'xmnu' resources with the ResEdit Appearance Manager templates, but you have to tread carefully:
The 'dftb' resource consists of a list of font styles. Each font style # (denoted with a ***** in the ResEdit template), is either blank, or consists of data (a case statement). To fake this in ResEdit, we need to use another list. If we want to indicate that the font style # is blank, the second list has only one item, which looks like "1) -----". If the font style # consists of data, we create one item in the second list, and fill in all the fields. This will be immediately followed by a second item "2) -----", which must be left blank. You cannot have more than one piece of data for each font style #. That is, the ResEdit templates will not stop you from creating more that one piece of data for each font style #, but it is wrong in the context of the 'dftb' resource. Open a few existing 'dftb' resources to see this.
A similar situation applies to 'xmnu' resource - each Item Extension is either blank or consists of data, and there can only be one piece of data for each Item Extension.
3. There is quite a lot of data (particularly bit data) that is marked as reserved. ResEdit's template structure does not allow hiding reserved (filler) bit data, so this reserved data is sometimes 'exposed' in the ResEdit template. Do not edit anything that is marked as reserved or unused.
4. A 'DLGX' resource is not the same as a 'dlgx' resource. The ResEdit templates provided in this package will only work with the latter.
Contact Information
If you should have any problems with these templates, or find a bug, please write to me. I can be contacted at: